package com.kob.design.singleton.hungry;

/**
 * @Description: 饿汉式: 静态代码块
 * @Author: fyt
 * @Date: 2024/4/15 18:18
 **/
public class Singleton2 {

    private Singleton2() {
    }

    private static Singleton2 instance;

    static {
        instance = new Singleton2();
    }

    public static Singleton2 getInstance() {
        return instance;
    }
}
